package com.dream.service.user.dao;

import com.dream.service.user.domain.entity.Condition;
import com.dream.service.user.domain.model.StoreAddrModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 门店
 */
public interface StoreAddrDao {


    /**
     * country查看门店
     * @param country
     * @return
     * @throws Exception
     */
     List<StoreAddrModel> selectByCountry(@Param("country") String country)  throws Exception;


    List<StoreAddrModel> selectByCity(@Param("city") String city)  throws Exception;

    List<StoreAddrModel> selectByCityAndStatus(@Param("city") String city,@Param("status") Integer status);


    Integer  addStoreAddress(StoreAddrModel storeAddrModel);


    List<StoreAddrModel> selectByCityAndName(@Param("city") String city,@Param("name") String name)  throws Exception;

    /**
     * 根据门店id查询
     * @param storeId
     * @return
     */
    StoreAddrModel selectById(@Param("id") Integer storeId);


    List<StoreAddrModel> selectByIds(@Param("ids") List<Integer> storeIds);

    List<StoreAddrModel> selectByCondtion(Condition condition)  throws Exception;

    Integer selectByCondtionCount(Condition condition)  throws Exception;

    Integer updateStoreAddress(StoreAddrModel storeAddrModel)  throws Exception;

    Integer  deleteStoreAddress(@Param("id") Integer storeId);
}
